const clock = ()=>{
	const oDate=new Date();
	let year=oDate.getFullYear();
	let month=oDate.getMonth()+1;
	let date=oDate.getDate();
	let hours=oDate.getHours();
	let minutes=oDate.getMinutes();
	let seconds=oDate.getSeconds();
	
	month = month > 9 ? month : '0' + month;
	date = date > 9 ? date : '0' + date;
	hours = hours > 9 ? hours : '0' + hours;
	minutes = minutes > 9 ? minutes : '0' + minutes;
	seconds = seconds > 9 ? seconds : '0' + seconds;
	return `${year}-${month}-${date} ${hours}:${minutes}:${seconds}`;
}

export default clock;